home *** CD-ROM | disk | FTP | other *** search
- /*
- PAP.h
- C Interface to PAP.WrkStation.o
-
- Copyright Apple Computer, Inc. 1992-1995
- All rights reserved
- */
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __APPLETALK__
- #include <AppleTalk.h>
- #endif
-
- enum
- {
- PAPMaxDataSize = 512, /* Maximum data size per flow quantum */
-
- PAPNoCCBs = -4096, /* No free CCBs available */
- PAPNoPrinter = -4101, /* Printer or print server not found */
- PAPConnClosed = -4100, /* Connection just closed */
- PAPBadRefnum = -4097, /* Bad connection refnum */
- PAPActive = -4098, /* Request already active */
- PAPTooBig = -4099 /* Write request too big */
- };
-
- #if GENERATINGPOWERPC
- //#if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PAPStatusRec
- {
- SignedByte papSocket; /* PAPOpen output: ATP responding socket */
- SignedByte papFlow; /* PAPOpen output: Printer's Flow quantum */
- short papResult; /* PAPOpen output: Result of last PAPOpen request */
- Str255 statusStr; /* PAPOpen and PAPStatus output: Status string */
- };
- #if GENERATINGPOWERPC
- //#if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PAPStatusRec PAPStatusRec;
- typedef PAPStatusRec *PAPStatusRecPtr, **PAPStatusRecHandle;
-
-
- pascal OSErr PAPOpen(short *refNum,
- const EntityName *printerName,
- short flowQuantum,
- PAPStatusRec *statusBuff,
- OSErr *compState);
-
- pascal OSErr WPAPClose(short refNum);
-
- pascal OSErr WPAPRead(short refNum,
- void *readBuff,
- short *dataSize,
- short *eof,
- OSErr *compState);
-
- pascal OSErr WPAPWrite(short refNum,
- const void *dataBuff,
- short dataSize,
- short eof,
- OSErr *compState);
-
- pascal OSErr PAPStatus(const EntityName *printerName,
- PAPStatusRec *statusBuff,
- AddrBlock *printerAddr);
-
- pascal OSErr WPAPUnload(void);
-